//
//  HTTPImageCell.m
//  WeboCon
//
//  Created by black sun on 12-3-6.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "HTTPImageCell.h"

@implementation HTTPImageCell
@synthesize url=_url;

-(void)setUrl:(NSString *)url{
    if ([_url isEqualToString:url]) {
        return;
    }
    _url = url;
    if (_imageDownloader == nil) {
        _imageDownloader = [WCImageDownloader serviceWithDelegate:self];
    }
    [_imageDownloader downloadImageFrom:_url];
}

-(void)requestDidFinishedWithResult:(id)result andUserInfo:(NSDictionary *)userInfo{
    self.image = result;
}
-(void)requestDidFailureWithError:(NSError *)error andUserInfo:(NSDictionary *)userInfo{
    NSLog(@"down load image error for url:%@ ------ %@",_url,error.domain);
}

@end
